import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    pathname:"",
   
  },
  getters: {
    getlength(state){
      return state.pathname.length
    }
  },
  mutations: {
    savepath(state,pathname){
      state.pathname=pathname;
      
    },
    delaypath(state,pathname){
      state.pathname=pathname;
     
    }
  },
  actions: {
      delaystore(text,pathname){
        setTimeout(() => {
          text.commit('delaypath',pathname)
        }, 1000);
      }
  },
  modules: {
  }
})
